package com.koron.tool.service;

import com.koron.bean.base.Response;
import com.koron.bean.system.staff.vo.EamUser;
import com.koron.tool.bean.*;
import org.koron.ebs.mybatis.SessionFactory;

import java.util.List;

/**
 * @Author: laiguangming
 * @Date: 2022/10/8 10:22
 */
public interface ToolInventoryService {

    /**
     * 获取库房盘点列表
     * @param sessionFactory
     * @param toolInventoryQuery
     * @return
     */
    Response getInventoryStatus(SessionFactory sessionFactory, ToolInventoryQuery toolInventoryQuery);

    /**
     * 切换盘点准备状态
     * @param sessionFactory
     * @param bean
     * @return
     */
    Response switchInventoryPreparation(SessionFactory sessionFactory, EamUser user, WarehouseInventoryBean bean);

    /**
     * 创建盘点单
     * @param sessionFactory
     * @param user
     * @param bean
     * @return
     */
    Response createInventory(SessionFactory sessionFactory, EamUser user, ToolInventoryBean bean);

    /**
     * 查看库房的历史盘点记录
     * @param sessionFactory
     * @param toolInventoryQuery
     * @return
     */
    Response getHistoricalRecords(SessionFactory sessionFactory, ToolInventoryQuery toolInventoryQuery);

    /**
     * 配置盘点周期
     * @param sessionFactory
     * @param bean
     * @return
     */
    Response configureInventoryCycle(SessionFactory sessionFactory, WarehouseInventoryBean bean);

    /**
     * 从所有盘点记录中过滤满足过滤条件的盘点单
     * @param sessionFactory
     * @param query
     * @return
     */
    Response getInventoryList(SessionFactory sessionFactory, ToolInventoryQuery query);


    /**
     * 取消盘点
     * @param sessionFactory
     * @param query
     * @return
     */
    Response cancelInventory(SessionFactory sessionFactory, ToolInventoryQuery query);

    /**
     * 向盘点单零时清单中插入数据
     * @param sessionFactory
     * @param RFIDs
     * @param user
     * @return
     */
    Response insertInventoryCheckListTmp(SessionFactory sessionFactory, EamUser user, List<String> RFIDs);

    /**
     * 获取盘点单详情
     * @param sessionFactory
     * @param query
     * @param operation
     * @return
     */
    Response getInventoryDetail(SessionFactory sessionFactory, ToolInventoryCheckListQuery query, Integer operation);

    /**
     * 保存盘点数据
     * @param sessionFactory
     * @param user
     * @param inventoryId
     * @return
     */
    Response saveInventory(SessionFactory sessionFactory, EamUser user, String inventoryId);

    /**
     * 获取核对页面详情
     * @param sessionFactory
     * @param query
     * @return
     */
    Response getInventoryCheckDetail(SessionFactory sessionFactory, ToolInventoryCheckListQuery query);

    /**
     * 确定盘点
     * @param sessionFactory
     * @param user
     * @param beanList
     * @return
     */
    Response confirmInventory(SessionFactory sessionFactory, EamUser user, List<ToolInventoryReportBean> beanList);

    /**
     * 获取盘点报告
     * @param sessionFactory
     * @param inventoryId
     * @return
     */
    Response getInventoryReport(SessionFactory sessionFactory, String inventoryId);

}
